package university;

/**
 * Class that describes information about knowledge control events
 * @author anatolii.bondarenko on 1/21/14.
 */
abstract class KnowledgeControl {
    /**
     * @param d describes discipline to be examined
     * @param ev describes place and time of examination
     */
    public KnowledgeControl(Discipline d, ExamEvent ev){
        discipline = d;
        timeAndPlace = ev;
    }
    public abstract String toString();

    /**
     * Gets discipline name
     * @return returns name of discipline that will be examined
     */
    public String getDiscipline(){
        return discipline.getDisciplineName();
    }

    /**
     * Gets examinator's name
     * @return returns name of examinator
     */
    public String getTeacher(){
        return discipline.getTeacher().getName();
    }

    /**
     * Gets time and place of examination
     * @return returns time and place of examination
     */
    public String getTimeAndPlace(){
        return " will take place in building " + timeAndPlace.getBuilding()
                + " in room " + timeAndPlace.getRoom() + " at " + timeAndPlace.getEventTime();
    }

    private Discipline discipline;
    private ExamEvent timeAndPlace;
}
